import request from "@/utils/request";

export function addConsult(consult) {
    return request({
        url: '/consult/addConsult',
        method: 'post',
        data: consult
    })
}

export function deleteConsult(ids) {
    return request({
        url: '/consult/deleteConsult',
        method: 'delete',
        data: ids
    })
}
export function chooseConsult(ids, agencyId) {
    return request({
        url: '/consult/chooseConsult?agencyId=' + agencyId,
        method: 'post',
        data: ids
    })
}
export function unchooseConsult(ids) {
    return request({
        url: '/consult/unchooseConsult',
        method: 'post',
        data: ids
    })
}
export function changeConsult(consult) {
    return request({
        url: '/consult/updateConsult',
        method: 'post',
        data: consult
    })
}

export function getAllConsult(consult, page, pageSize) {
    return request({
        url: '/consult/getAllConsult?' + 'page=' + page + '&pageSize=' + pageSize,
        method: 'post',
        data: consult
    })
}
export function getConsultList() {
    return request({
        url: '/consult/getConsultList',
        method: 'get',
    })
}
export function getConsultListForAgency(agencyId, searchChoose) {
    let choose = 1;
    if (searchChoose) {
        choose = 0
    }
    return request({
        url: '/consult/getConsultListForAgency?agencyId=' + agencyId + "&choose=" + choose,
        method: 'get',
    })
}


export function getConsultForUser() {
    return request({
        url: '/consult/getConsultForUser',
        method: 'get',
    })
}

export function sendMessage(question) {
    return request({
        url: '/consult/sendMessage?question=' + question,
        method: 'post',
    })
}






